package com.yunhe.dtu.constant;

/**
 * @ClassName HttpStatus
 * @Description 状态码
 * @Author HeTao
 * @Date 2020/11/16 14:23
 * @Version 1.0
 **/
public class HttpConstant {

    public enum Http_Status{
        OK(200, "调用成功"),
        Unauthorized(401, "没有权限"),
        INVALID_REQUEST(400, "请求参数有错误"),
        NOT_FOUND(404, "服务没找到"),
        INTERNAL_SERVER_ERROR(500, "服务器发生错误");

        private int value;
        private String title;
        Http_Status(int value, String title) {
            this.value = value;
            this.title = title;
        }
        public int value() {
            return value;
        }
        public String title() {
            return title;
        }
    }
}
